﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ComparativoListGrid.ascx.cs" Inherits="UILGestion.Control.ComparativoListGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>


<asp:Panel runat="server" ID="Panelcomparativo"  >

<asp:DataPager ID="pager" PagedControlID="ComparativoListView" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>

<asp:ListView ID="ComparativoListView" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal,idObra" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer"   border="0"   runat="server"  >
            
            <tr id="Tr1" runat="server" class="ms-crm-List-Header" >
            
                <th id="Th1" runat="server">
                    <asp:LinkButton ID="lb2" CommandName="Sort" ForeColor="Blue" CommandArgument="numDocumento"  runat="server"> CODIGO</asp:LinkButton>
                </th>
                <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" ForeColor="Blue" CommandArgument="fecha" runat="server">FECHA</asp:LinkButton>
                    </th>
                <th id="Th3" runat="server">
                    <asp:LinkButton ID="lb3" CommandName="Sort" CommandArgument="codDescripcionEC" ForeColor="Blue" runat="server">ESTRUCTURA COMPRAS</asp:LinkButton>
                </th>
                <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" CommandArgument="descripcion" ForeColor="Blue" runat="server">DESCRIPCION</asp:LinkButton>
                </th>
                <th id="Th4" runat="server">
                    <asp:LinkButton ID="LinkButton2"  CommandName="Sort" CommandArgument="totalBase" ForeColor="Blue" runat="server">MONTO <br /> BASE</asp:LinkButton>
                </th>
                <th id="Th5" runat="server">
                    <asp:LinkButton ID="LinkButton3"  CommandName="Sort" CommandArgument="totalBaseProveedorSelec" ForeColor="Blue" runat="server">MONTO <br /> CONTRATADO</asp:LinkButton>
                </th>
               <%-- <th id="Th10" runat="server">
                    <asp:LinkButton ID="LinkButton8"  CommandName="Sort" CommandArgument="totalContratado" runat="server">Monto Contratado</asp:LinkButton>
                </th>--%>
                <th id="Th11" runat="server">
                    <asp:LinkButton ID="LinkButton9"  CommandName="Sort" CommandArgument="totalPorAprobar" ForeColor="Blue" runat="server">SALDO DISPONIBLE</asp:LinkButton>
                </th>
                <th id="Th6" runat="server">
                    <asp:LinkButton ID="LinkButton4"  CommandName="Sort" CommandArgument="estado" ForeColor="Blue" runat="server">ESTADO</asp:LinkButton>
                </th>
                <th id="Th8" runat="server">
                    <asp:LinkButton ID="LinkButton6"  CommandName="Sort" CommandArgument="proveedorSelec" ForeColor="Blue" runat="server">PROVEEDOR SELECCION</asp:LinkButton>
                </th>

                <th id="Th9" runat="server">
                    <asp:LinkButton ID="LinkButton7"  CommandName="Sort" CommandArgument="fechaAprob" ForeColor="Blue" runat="server">APROBACION</asp:LinkButton>
                </th>
                  <%-- <th id="Th12" runat="server">
                    <asp:LinkButton ID="LinkButton10"  CommandName="Sort" CommandArgument="totalDevolucionMon" runat="server">totalDevolucionMon</asp:LinkButton>
                </th>--%>
                     

            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr  style='border-color:Silver;background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>
            <td width="65px">
            
                <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"numDocumento").ToString()%>'  
                 Target="_self"  ID="Comparativo"
                NavigateUrl='<%# "~/ObraAdmin/Comparativos/ComparativoReadForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idinternal").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
               />   
                
                

            </td>
            <td width="75px">
                <%# Eval("FechaStr")%><br />
            </td>
            <td>
             <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"codDescripcionEC").ToString()%>'  
                 Target="_self"  ID="Hyperlink1"
                NavigateUrl='<%# "~/ObraAdmin/EstructuraCompras/EstructuraCostoEditForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idEstructuraCosto").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
               />   

            </td>
             <td>
                <%# Eval("descripcion")%><br />
            </td>
            
            <td align="right" width="90px">
            <%# Eval("totalBaseMon")%><br />
                 
            </td>
            <td align="right" width="90px">
            <%# Eval("totalBaseProveedorSelecMon")%><br />
            </td>
            <td Width="70px" align="right">
            <%# Eval("totalPorAprobar")%><br />
            </td>
           <%-- <td Width="120px" align="right">
                <%# Eval("totalPorAprobarMon")%>
            </td>--%>
            <td Width="90px" align="right">
                <%# Eval("estado")%>
            </td>
            <td Width="150px" align="right">
                <%# Eval("proveedorSelec")%>
            </td>
            <td Width="50px">
                <%# Eval("fechaAprobStr")%>
            </td>
           <%--  <td Width="50px">
                <%# Eval("totalDevolucionMon")%>
            </td>--%>
           
           <%-- <td >
                   <asp:ImageButton runat= "server" 
               
                 Target="_self"  ID="Hyperlink1"
                PostBackUrl='<%# "~/ObraAdmin/ComparativoEditForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idInternal").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 

                
                 CssClass="GridIcon ico-edit" BorderStyle="None" ImageUrl="~/Images/listing/ico-edit.png"
               />  
                                  
            </td>--%>
            <%--<td>
                <asp:HyperLink ID="AddressLink" runat="server" Target="_blank" NavigateUrl='<%# "http://www.google.com/maps?q=" + Eval("Address") + ",+" + Eval("CityStateZip") %>'
                    Text='<%# Eval("Address") %>'></asp:HyperLink>
                <br />
                <%# Eval("CityStateZip") %>
            </td>--%>
            <%--<td>
                <asp:Repeater ID="Phones" runat="server" DataSource='<%# Eval("Phones") %>'>
                    <ItemTemplate>
                        <%# Container.DataItem %><br />
                    </ItemTemplate>
                </asp:Repeater>
                <cc1:EmailHyperlink ID="EmailLink" runat="server" Text='<%# Eval("Email") %>' Email='<%# Eval("Email") %>'
                    Name='<%# Eval("Name") %>'></cc1:EmailHyperlink>
            </td>--%>
            
           <%-- <td>
                <asp:HyperLink ID="HyperLink1" runat="server" 
                    ToolTip="Add to/Remove from Active Tag"><%# (bool)Eval("HasTag") ? "Remove" : "Add" %></asp:HyperLink>
            </td>--%>
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                     <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>



</asp:Panel>

    
     